package com.shopping_back.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shopping_back.pojo.dto.EvaluationDTO;
import com.shopping_back.pojo.entity.Evaluation;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 商品评价表 服务类
 * </p>
 *
 * @author Jack
 * @since 2025-07-12
 */
public interface IEvaluationService extends IService<Evaluation> {
    Page<Evaluation> listAll(Integer pageNum, Integer pageSize, Integer auditStatus);

    /**
     * 分页查询商品评价
     * @param spuId 商品ID
     * @param page 页码
     * @param size 页大小
     * @return 分页结果
     */
    com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.shopping_back.pojo.vo.EvaluationVO> getProductEvaluations(Long spuId, int page, int size);

    /**
     * 提交评价
     */
    void submitEvaluation(com.shopping_back.pojo.dto.EvaluationSubmitDTO dto, Long userId);
    void deleteByAdmin(Long id);

    void approve(Long id);

    Page<EvaluationDTO> getEvaluations(Long merchantId, int page, int size);
}
